package cz.pproproj.aaservice.aasbllmodule.authorization;

import cz.pproproj.aaservice.guimodule.model.AuthorizationRole;
import cz.pproproj.aaservice.guimodule.model.AuthorizationUser;

import java.util.List;
import java.util.Map;

/**
 * @author David
 * @since 18. 1. 2015
 */
public interface AuthorizationModuleAccess {

    List<AuthorizationRole> getRolesFromUser(AuthorizationUser user);

    List<AuthorizationRole> getAllRoles();

    boolean removeRole(AuthorizationRole role);

    boolean addRole(AuthorizationRole role);

    boolean removeMapping(AuthorizationUser user, List<AuthorizationRole> roles);

    boolean addMapping(AuthorizationUser user, List<AuthorizationRole> roles);

    boolean authorize(AuthorizationUser user, AuthorizationRole role);

    Map<AuthorizationUser, List<AuthorizationRole>> getAllMappings();
    
}
